package cc.vv.btpartyjob.partymanager.adapter

import android.widget.TextView
import cc.vv.baselibrary.adapter.SimpleCommonAdapter
import cc.vv.baselibrary.adapter.holder.ExtendViewHolder
import cc.vv.btpartyjob.jnimodule.server.OperationServer
import cc.vv.btpartyjob.partymanager.R
import cc.vv.party.beans.vo.UnitVO

/**
 * 单位报到已报到、未报到 adapter
 * Created by Chen.qi on 2018/10/24.
 */
class RegisterAdapter(layoutResId: Int) : SimpleCommonAdapter<UnitVO>(layoutResId) {
    override fun convert(helper: ExtendViewHolder, item: UnitVO, position: Int) {
        //单位名称
        helper.getView<TextView>(R.id.tv_item_registerName)?.text = item.unitName

        //时间
        helper.getView<TextView>(R.id.tv_item_registerTime)?.text = OperationServer.formatStr(item.reportTime)

        //负责人
        helper.getView<TextView>(R.id.tv_item_perName)?.text = item.principal

        //负责人电话
        helper.getView<TextView>(R.id.tv_item_prtTel)?.text = item.mobile
    }
}